<template>
    <!-- lsy telegram -->
    <div :class="['telegram',`${vueState.pageInfo.lang}`]" @click="clickItem"></div>
</template>
<script>
import { inject } from 'vue'
export default {
    setup(props) {
        const vueState = inject('vueState')
        const clickItem = ()=>{
            const url = {
                IN:'https://t.me/makemoneyeveryday123',
                US:'https://t.me/makemoneyatease1',
                BR:'https://t.me/GanhardinheiroNobrasil'
            }
            const jumpUrl = url[vueState.countryInfo.country] || url['US']
            window.common ? window.common.openBrowser(jumpUrl) : window.AdSDK.openBrowser(jumpUrl)
            window.trackEvent({pageTitle:'mePage',ev:'clickTelegram'})
            // console.log(window.common.openBrowser,);
        }
        return {
            vueState,
            clickItem
        }
    }
}
</script>
<style lang="less" scoped>
.telegram{
    position: fixed;
    z-index: 10;
    left: .1rem;
    bottom: 1rem;
    height: .8rem;
    width: .8rem;
    background: url(https://cdn.yowin.mobi/pub/cr/602.1645670914.gif) no-repeat center;
    background-size: contain;
    &.pt{
        background-image: url(https://cdn.yowin.mobi/pub/cr/603.1645671072.gif);
    }
}
</style>